package com.zbw;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class myServlet  extends HttpServlet {
    //init method
    public void init() throws ServletException {}
    //handle get request
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("doGet>>>>>"+request.getRequestURL());
    }
    //handle post request
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("doPost>>>>>"+request.getRequestURL());
    }
    //handle put request
    @Override
    protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    }
    //handle delete request
    @Override
    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    }
    //destroy
    @Override
    public void destroy() {
        System.out.println("destroy>>>>>");
    }
}
